/**
 * chinagoods.com
 * Copyright (c) 2020-2024 All Rights Reserved.
 */
package com.ruoyi.web.controller.api;
/**
 * @author yangpeng
 * Created by on 2024-01-22 21:27
 */

import com.ruoyi.web.controller.bot.YpTestBot;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.telegram.telegrambots.meta.api.methods.send.SendMessage;
import org.telegram.telegrambots.meta.api.methods.send.SendPhoto;
import org.telegram.telegrambots.meta.api.methods.send.SendVideo;


@RestController
@RequestMapping("/api/orderPay")
@Slf4j
public class BFController {


    String chaid = "-4155567216";


    @PostMapping("/botSendMessage")
    public void botSendMessage(@RequestBody SendMessage sendMessage) throws Exception {
        YpTestBot ypTestBot = new YpTestBot();
        sendMessage.setChatId(chaid);
        ypTestBot.executeAsync(sendMessage);

    }


    @PostMapping("/botSendPhoto")
    public void botSendMessage(@RequestBody SendPhoto sendMessage) throws Exception {
        YpTestBot ypTestBot = new YpTestBot();
        sendMessage.setChatId(chaid);
        ypTestBot.executeAsync(sendMessage);

    }


    @PostMapping("/botSendVideo")
    public void botSendMessage(@RequestBody SendVideo sendMessage) throws Exception {
        YpTestBot ypTestBot = new YpTestBot();
        sendMessage.setChatId(chaid);

        ypTestBot.executeAsync(sendMessage);

    }


}
